package com.yao.club.reposittory;

import com.yao.club.entity.dto.PostsCommentLikeRecord;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

@Repository
public interface PostsCommentLikeRecordRepository extends JpaRepository<PostsCommentLikeRecord, String> {


    @Query(nativeQuery=true,value = "SELECT * from posts_comment_like_record WHERE posts_id = ?1 AND posts_comment_id = ?3 and user_id =?2 ")
    PostsCommentLikeRecord selectLikeByPostsId(String postsId, Long userId, String posts_comment_id);


}
